$(function () {
    findAll();
});

function findAll() {
    let data = myAjax("/home", {}, "get");

    setCompanyModel(data.ompanyModel);
    setNavList(data.navModelList);
}

function setCompanyModel(data) {
    $("#logo").attr("src", data.logo);
    $("#name").html(data.phone);
    $("#enName").html(data.enName);
}

function setNavList(data) {
    let html = '';
    for (let i = 0; i < data.length; i++) {
        html += '<a href="'+data[i].href+'">\n' +
            '                <div>'+data.title+'</div>\n' +
            '            </a>';
    }
    $("#navHtml").html(html);
}
function setNewsList(data) {
    
}
